const nodemailer = require('nodemailer')
const { EMAIL_KEY, USER_EMAIL } = require('../config/emailKey')

const userEmail = USER_EMAIL
const transporter = nodemailer.createTransport({
  service: '163',
  secureConnection: true,
  auth: {
    user: userEmail,
    pass: EMAIL_KEY  //这个是开启`POP3/SMTP/IMAP`的授权码
  }
})

module.exports = transporter